package com.github.prontera.domain;

import java.math.BigDecimal;
import java.time.OffsetDateTime;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.github.prontera.domain.enums.SystemAccountStatusEnum;
import com.github.prontera.domain.enums.SystemAccountTypeEnum;
import com.github.prontera.model.BasicDomain;
import com.github.prontera.util.converter.jackson.OffsetDateTimeToIso8601Serializer;

import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * 
 * u_system_account-系统账户
 *
 */
@ToString
@EqualsAndHashCode(callSuper = true)
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class SystemAccount extends BasicDomain{

	private static final long serialVersionUID = 1L;
    
	/**
	 * 产品ID
	 */
	@ApiModelProperty(value = "产品ID")
    private Long productId;
	
	/**
	 * 付款用户ID
	 */
	@ApiModelProperty(value = "付款用户ID")
    private Long clientId;
	/**
	 * 接受方ID
	 */
	@ApiModelProperty(value = "接受方ID")
    private Long acceptorId;
	/**
	 * 支付成功时间(付款用户)
	 */
	@ApiModelProperty(value = "支付成功时间(付款用户)")
	@JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class)
    private OffsetDateTime paySuccessTime;
	/**
	 * 接受方接受时间(比如: 视频呗回答时间)
	 */
	@ApiModelProperty(value = "接受方接受时间(比如: 视频呗回答时间)")
	@JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class)
    private OffsetDateTime acceptorTime;
	/** 
	 * 支付金额
	 */
	@ApiModelProperty(value = "支付金额")
    private BigDecimal amount;
	/** 
	 * 消费金额
	 */
	@ApiModelProperty(value = "消费金额")
	private BigDecimal consumeAmount;
	/**
	 * 状态, 0:待付款用户付款, 1:待接受, 2:已接受, 3:系统退款
	 */
	@ApiModelProperty(value = "状态, 0:待付款用户付款, 1:待接受, 2:已接受, 3:系统退款")
    private SystemAccountStatusEnum status;
	/**
	 * 类型: 红包,圈子,查看视频等都是可退款
	 * 
	 * 1: 红包 2:圈子 3:查看视频 4:达人付款
	 */
	@ApiModelProperty(value = "1: 红包 2:圈子 3:查看视频 4:达人付款")
    private SystemAccountTypeEnum type;
	
	/**
	 * 接受方ID
	 */
	@JsonIgnore
	@JsonIgnoreProperties
    private Boolean isNullAcceptorId;
    
    public SystemAccount(){
    
    }
  
	public BigDecimal getConsumeAmount() {
		return consumeAmount;
	}

	public void setConsumeAmount(BigDecimal consumeAmount) {
		this.consumeAmount = consumeAmount;
	}

	public Boolean getIsNullAcceptorId() {
		return isNullAcceptorId;
	}

	public void setIsNullAcceptorId(Boolean isNullAcceptorId) {
		this.isNullAcceptorId = isNullAcceptorId;
	}

	public Long getProductId() {
		return productId;
	}

	public void setProductId(Long productId) {
		this.productId = productId;
	}

	public Long getClientId() {
        return this.clientId;
    }
    
    public void setClientId(Long clientId) {
        this.clientId = clientId;
    }
    public Long getAcceptorId() {
        return this.acceptorId;
    }
    
    public void setAcceptorId(Long acceptorId) {
        this.acceptorId = acceptorId;
    }
    public OffsetDateTime getPaySuccessTime() {
        return this.paySuccessTime;
    }
    
    public void setPaySuccessTime(OffsetDateTime paySuccessTime) {
        this.paySuccessTime = paySuccessTime;
    }
    public OffsetDateTime getAcceptorTime() {
        return this.acceptorTime;
    }
    
    public void setAcceptorTime(OffsetDateTime acceptorTime) {
        this.acceptorTime = acceptorTime;
    }
    public BigDecimal getAmount() {
        return this.amount;
    }
    
    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }
    public SystemAccountStatusEnum getStatus() {
        return this.status;
    }
    
    public void setStatus(SystemAccountStatusEnum status) {
        this.status = status;
    }
    public SystemAccountTypeEnum getType() {
        return this.type;
    }
    
    public void setType(SystemAccountTypeEnum type) {
        this.type = type;
    }
    
}
